package com.zk.schedule;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Task01 {

    public static void main(String[] args) throws Exception {
        new ClassPathXmlApplicationContext("classpath:app.xml");

        Thread.sleep(10000L);

        OpAdapter.stopServer();

        Thread.sleep(10000L);

        new Thread(new Runnable() {
            @Override
            public void run() {
                try {
                    OpAdapter.startServer();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }).start();


        Thread.sleep(Long.MAX_VALUE);
    }

}